CREATE TABLE jms_dm.dm_mng_complaint_daliy_network_summary_dt
(
    network_code       varchar(100) COMMENT '统计网点code',
    proxy_code         varchar(100) COMMENT '统计代理区code',
    network_name       varchar(100) COMMENT '统计网点name',
    proxy_name         varchar(100) COMMENT '统计代理区name',
    network_type       varchar(100) COMMENT '统计网点类型1-总部,2-代理区,3-加盟商,4-中心,5-集散点,6-网点',
    date_time          date COMMENT '登记日期',
    order_1day_num     int(11) COMMENT '工单总量 T-1',
    order_2day_num     int(11) COMMENT '工单总量 T-2',
    order_3day_num     int(11) COMMENT '工单总量 T-3',
    order_4day_num     int(11) COMMENT '工单总量 T-4',
    close_num          int(11) COMMENT '关闭量',
    1h_response_num    int(11) COMMENT '1h响应量',
    1h_response_rate   double COMMENT '1h响应率',
    order_24result_num int(11) COMMENT '24h解决量',
    24result_rate      double COMMENT '24h解决率',
    order_48result_num int(11) COMMENT '48h解决量',
    48result_rate      double COMMENT '48h解决率',
    2complaint_num     int(11) COMMENT '工单二次投诉量',
    2complaint_rate    double COMMENT '工单二次投诉率'
) ENGINE=OLAP 
DUPLICATE KEY( network_code ,  proxy_code )
COMMENT '客服日报表一期汇总（新增客服日报表）'
PARTITION BY RANGE(date_time)
(START ('2023-02-01') END ('2023-03-31') EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(date_time) BUCKETS 1
PROPERTIES (
'replication_num' = '3',
'dynamic_partition.enable' = 'true',
'dynamic_partition.time_unit' = 'DAY',
'dynamic_partition.time_zone' = 'Asia/Shanghai',
'dynamic_partition.start' = '-180',
'dynamic_partition.end' = '3',
'dynamic_partition.prefix' = 'p',
'dynamic_partition.buckets' = '1',
'in_memory' = 'false',
'storage_format' = 'V2'
);